<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">


    <div class="form-group">
        <label for="c-username" class="control-label col-xs-12 col-sm-2">订单号:</label>
        <div class="col-xs-12 col-sm-4">{$row.order_sn}
        </div>
    </div>
    <div class="form-group">
        <label for="c-nickname" class="control-label col-xs-12 col-sm-2">客户姓名:</label>
        <div class="col-xs-12 col-sm-4">{$row.kehu_truename}
        </div>
    </div>

    <div class="form-group">
        <label for="c-nickname" class="control-label col-xs-12 col-sm-2">性别:</label>
        <div class="col-xs-12 col-sm-4">{$row.kehu_sex==1 ? '男' : '女'}
        </div>
    </div>
	
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">手机号:</label>
        <div class="col-xs-12 col-sm-4">{$row.kehu_mobile}
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">地址:</label>
        <div class="col-xs-12 col-sm-4">{$row.kehu_addr}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">户型区域:</label>
        <div class="col-xs-12 col-sm-4">{$row.num_fang}房{$row.num_ting}厅
        </div>
    </div>
	
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">户型面积:</label>
        <div class="col-xs-12 col-sm-4">{$row.mianji} m<sup>2</sup>
        </div>
    </div>	
	
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">房屋状态:</label>
        <div class="col-xs-12 col-sm-4">{$zidian[$row.house_state] ?? ''}
        </div>
    </div>	
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">户型类别:</label>
        <div class="col-xs-12 col-sm-4">{$zidian[$row.house_type] ?? ''}
        </div>
    </div>		
	
	{if $row.order_tp eq 0}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">意向产品:</label>
        <div class="col-xs-12 col-sm-4">{$zidian[$row.demand] ?? ''}
        </div>
    </div>	
	{/if}

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">预约时间:</label>
        <div class="col-xs-12 col-sm-4">{$row.yuyue_time}
        </div>
    </div>		

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">勘察费用:</label>
        <div class="col-xs-12 col-sm-4">{$row.order_amount}
        </div>
    </div>	
	

{if !empty($goods_list)}
<hr />	
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">产品信息:</label>
        <div class="col-xs-12 col-sm-4">
		
		
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-bordered">
  <tr>
    <td>关联产品订单号</td>
    <td>产品名称</td>
    <td>数量</td>
  </tr>
  
  <?php foreach($goods_list as $v){?>
  <tr>
    <td><?php echo $v['order_id'].$v['goods_id'].$v['kehu_id'].$v['id'];?></td>
    <td><?php echo $v['goods_name'];?></td>
    <td>1</td>
  </tr>
  <?php }?>
</table>

		
        </div>
    </div>	
	
{/if}

	
	<hr />
	

<!-- 时间选择器样式表 -->
<link href="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
		<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
		<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
		<script src="https://cdn.bootcss.com/moment.js/2.22.1/moment-with-locales.min.js"></script>
		<script src="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">员工:</label>
        <div class="col-xs-12 col-sm-4">
		<select name="row[yg_id]" data-rule="required" class="form-control" {if $row.ispinglun>0}disabled="disabled"{/if}>
			<option value="0">请选择员工
               {foreach name="yuangong" item="vo"}
                <option value="{$vo.id}" {if $vo.id eq $row.yg_id}selected{/if}>{$vo.truename}</option>
                {/foreach}
		</select>
        </div>
    </div>
	
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">上门时间:</label>
        <div class="col-xs-12 col-sm-4"><input type="datetime" name="row[sm_time]" value="{$row.sm_time|date='Y-m-d H:i:s',###}" {if $row.ispinglun eq 1} disabled="disabled"{/if} class="form-control datetimepicker" id="datetime"  />
        </div>
    </div>
	
	<script>
		$("#datetime").datetimepicker({
			format: 'YYYY-MM-DD HH:mm:ss',
			locale: moment.locale('zh-CN'),
			minDate: '2020/02/22'
		});
		$(".layui-layer-close").click(function(){
			alert('ddd');
		})
	</script>
{if $row.ispinglun eq 0}
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
{/if}
</form>
{if get('ok') eq 1}
<script type="text/javascript">
	parent.say();
	var index = parent.layer.getFrameIndex(window.name);
	parent.layer.close(index);  
</script>
{/if}